package com.sync.data.mce.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.sync.data.base.BaseEntity;
import com.sync.data.base.CoreField;
import com.sync.data.common.annotation.FieldProps;
import com.sync.data.common.annotation.FieldType;
import com.sync.data.common.annotation.RenderType;
import com.sync.data.common.obj.annoation.ObjectPrefix;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import javax.persistence.Entity;
import java.beans.Transient;


/**
 * @author xianchuang.li
 * @version 1.0.0
 * @description
 * @since 2025/7/16 19:29
 **/
@Getter
@Setter
@Entity
@ObjectPrefix("vcsr")
public class ViewCustomer extends BaseEntity {
    @FieldProps(type = FieldType.STRING, label = "注册资本")
    private String regCapital;

    @FieldProps(type = FieldType.STRING, label = "邮箱")
    private String email;

    //1-是，0-否
    @FieldProps(type = FieldType.STRING, label = "是否线索创建的客户")
    private Integer isCrmLeadsCreate;

    @FieldProps(type = FieldType.STRING, label = "客户ID")
    private String customerId;

    @FieldProps(type = FieldType.STRING, label = "客户名称",sourceObject = "ViewCustomer", renderField = "customer", freetextField = "customerNameFreetext")
    private String customerName;

    @FieldProps(type = FieldType.STRING, label = "客户")
    private String customerNameFreetext;

    @FieldProps(type = FieldType.STRING, label = "客户编号")
    private String customerCode;

    @FieldProps(type = FieldType.DICT, label = "客户类型", renderType = RenderType.Select)
    private String customerType;

    @FieldProps(type = FieldType.STRING, label = "国家名称",reference = "customer.hcoCountryId",sourceObject = "SysRegion", renderField = "sysRegionCountry", renderType = RenderType.SourcePicker)
    private String hcoCountryId;

    @FieldProps(type = FieldType.STRING, label = "省份名称",reference = "customer.hcoProvinceId",sourceObject = "SysRegion", renderField = "sysRegionProvince", renderType = RenderType.SourcePicker)
    private String hcoProvinceId;

    @FieldProps(type = FieldType.STRING, label = "地级市名称",reference = "customer.hcoCityId",sourceObject = "SysRegion", renderField = "sysRegionCity", renderType = RenderType.SourcePicker)
    private String hcoCityId;

    @FieldProps(type = FieldType.STRING, label = "区县名称",reference = "customer.hcoDistrictId",sourceObject = "SysRegion", renderField = "sysRegionDistrict", renderType = RenderType.SourcePicker)
    private String hcoDistrictId;

    @FieldProps(type = FieldType.STRING, label = "注册地址",reference = "customer.hcoAddress")
    private String hcoAddress;

    @FieldProps(type = FieldType.STRING, label = "邮编")
    private String hcoPostCode;

    @FieldProps(type = FieldType.DICT, label = "管理级别",reference = "customer.managementLevel", renderType = RenderType.Select)
    private String managementLevel;


    @FieldProps(type = FieldType.DICT, label = "企业类型",reference = "customer.enterpriseType", renderType = RenderType.Select)
    private String enterpriseType;

}
